<html>
<head>
<title>Kwadrat.java</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.ln { color: rgb(0,0,0); font-weight: normal; font-style: normal; }
.s0 { color: rgb(0,0,128); font-weight: bold; }
.s1 { }
.s2 { color: rgb(128,128,128); font-style: italic; }
.s3 { color: rgb(0,128,0); font-weight: bold; }
.s4 { color: rgb(0,0,255); }
</style>
</head>
<BODY BGCOLOR="#ffffff">
<TABLE CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#C0C0C0" >
<TR><TD><CENTER>
<FONT FACE="Arial, Helvetica" COLOR="#000000">
Kwadrat.java</FONT>
</center></TD></TR></TABLE>
<pre>

<a name="l1"><span class="s0">package </span><span class="s1">figury; 
<a name="l2"> 
<a name="l3"></span><span class="s2">/** 
<a name="l4"> * Author: Daniel Michalski 
<a name="l5"> * Date: 26.02.13 
<a name="l6"> */</span><span class="s1"> 
<a name="l7"> 
<a name="l8"></span><span class="s0">public class </span><span class="s1">Kwadrat { 
<a name="l9">    </span><span class="s0">private int </span><span class="s1">bok; 
<a name="l10"> 
<a name="l11">    </span><span class="s0">public </span><span class="s1">Kwadrat(</span><span class="s0">int </span><span class="s1">bok) { 
<a name="l12">        </span><span class="s0">this</span><span class="s1">.bok = bok; 
<a name="l13">    } 
<a name="l14"> 
<a name="l15">    </span><span class="s0">public void </span><span class="s1">wyswietlDlBoku() { 
<a name="l16">        System.out.println(</span><span class="s3">&quot;bok = &quot; </span><span class="s1">+ bok); 
<a name="l17">    } 
<a name="l18"> 
<a name="l19">    </span><span class="s0">public double </span><span class="s1">polePowierzchni() { 
<a name="l20">        </span><span class="s0">double </span><span class="s1">wynik; 
<a name="l21">        wynik = Math.pow((</span><span class="s0">double</span><span class="s1">) bok , </span><span class="s4">2</span><span class="s1">); 
<a name="l22">        </span><span class="s0">return </span><span class="s1">wynik; 
<a name="l23">    } 
<a name="l24"> 
<a name="l25">    </span><span class="s0">public </span><span class="s1">String toString(){ 
<a name="l26">        </span><span class="s0">return </span><span class="s3">&quot;figury.Kwadrat (bok = &quot; </span><span class="s1">+ bok + </span><span class="s3">&quot;) &quot;</span><span class="s1">; 
<a name="l27">    } 
<a name="l28"> 
<a name="l29">    </span><span class="s0">public int </span><span class="s1">getBok() { 
<a name="l30">        </span><span class="s0">return </span><span class="s1">bok; 
<a name="l31">    } 
<a name="l32">} 
<a name="l33"></span></pre>
</body>
</html>